package org.example.exampreparationtreasure.model.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Map;

@Data
@TableName(value = "answer_records", autoResultMap = true)
public class Answer implements Serializable {
    @TableId(value = "answer_id", type = IdType.AUTO)
    private Long answerId;

    private Long examRecordId;

    private Long questionId;

    private Integer responseTime;


    @TableField(value = "user_answer", typeHandler = JacksonTypeHandler.class)
    private Map<String, Object> userAnswer;

    private BigDecimal questionScore;

    //先是布尔类型，后改为int类型,数据库里面是tinyint
    private Integer isCorrect;

    private Long userId;

    private LocalDateTime createTime;

    private LocalDateTime updateTime;

    // 添加缺失的字段
    private LocalDateTime answerTime;
}



